<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>facedetect: GStreamer Bad Plugins 1.0 Plugins Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="GStreamer Bad Plugins 1.0 Plugins Reference Manual">
<link rel="up" href="ch01.html" title="gst-plugins-bad Elements">
<link rel="prev" href="gst-plugins-bad-plugins-faceblur.html" title="faceblur">
<link rel="next" href="gst-plugins-bad-plugins-faceoverlay.html" title="faceoverlay">
<meta name="generator" content="GTK-Doc V1.28 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#gst-plugins-bad-plugins-facedetect.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
                  <a href="#gst-plugins-bad-plugins-facedetect.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span> 
                  <a href="#gst-plugins-bad-plugins-facedetect.properties" class="shortcut">Properties</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="gst-plugins-bad-plugins-faceblur.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="gst-plugins-bad-plugins-faceoverlay.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="gst-plugins-bad-plugins-facedetect"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-facedetect.top_of_page"></a>facedetect</span></h2>
<p>facedetect</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="gst-plugins-bad-plugins-facedetect.properties"></a><h2>Properties</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="properties_type">
<col width="300px" class="properties_name">
<col width="200px" class="properties_flags">
</colgroup>
<tbody>
<tr>
<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-facedetect.html#GstFaceDetect--display" title="The “display” property">display</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td>
<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-facedetect.html#GstFaceDetect--eyes-profile" title="The “eyes-profile” property">eyes-profile</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><span class="type">GstOpencvFaceDetectFlags</span></td>
<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-facedetect.html#GstFaceDetect--flags" title="The “flags” property">flags</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-facedetect.html#GstFaceDetect--min-neighbors" title="The “min-neighbors” property">min-neighbors</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-facedetect.html#GstFaceDetect--min-size-height" title="The “min-size-height” property">min-size-height</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-facedetect.html#GstFaceDetect--min-size-width" title="The “min-size-width” property">min-size-width</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td>
<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-facedetect.html#GstFaceDetect--mouth-profile" title="The “mouth-profile” property">mouth-profile</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td>
<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-facedetect.html#GstFaceDetect--nose-profile" title="The “nose-profile” property">nose-profile</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td>
<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-facedetect.html#GstFaceDetect--profile" title="The “profile” property">profile</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a></td>
<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-facedetect.html#GstFaceDetect--scale-factor" title="The “scale-factor” property">scale-factor</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><a class="link" href="gst-plugins-bad-plugins-facedetect.html#GstFaceDetectUpdates" title="enum GstFaceDetectUpdates"><span class="type">GstFaceDetectUpdates</span></a></td>
<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-facedetect.html#GstFaceDetect--updates" title="The “updates” property">updates</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-facedetect.html#GstFaceDetect--min-stddev" title="The “min-stddev” property">min-stddev</a></td>
<td class="property_flags">Read / Write</td>
</tr>
</tbody>
</table></div>
</div>
<a name="GstFaceDetect"></a><div class="refsect1">
<a name="gst-plugins-bad-plugins-facedetect.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="gst-plugins-bad-plugins-facedetect.html#GstFaceDetect-struct" title="struct GstFaceDetect">GstFaceDetect</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="gst-plugins-bad-plugins-facedetect.html#GstFaceDetectUpdates" title="enum GstFaceDetectUpdates">GstFaceDetectUpdates</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="gst-plugins-bad-plugins-facedetect.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
    <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
        <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstObject.html#GstObject-struct">GstObject</a>
            <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstElement.html#GstElement-struct">GstElement</a>
                <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-libs-1.0/GstBaseTransform.html#GstBaseTransform-struct">GstBaseTransform</a>
                    <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gst-plugins-base-libs-1.0/GstVideoFilter.html#GstVideoFilter-struct">GstVideoFilter</a>
                        <span class="lineart">╰──</span> GstOpencvVideoFilter
                            <span class="lineart">╰──</span> GstFaceDetect
</pre>
</div>
<div class="refsect1">
<a name="gst-plugins-bad-plugins-facedetect.description"></a><h2>Description</h2>
<p>Performs face detection on videos and images.
If you have high cpu load you need to use videoscale with capsfilter and reduce the video resolution.</p>
<p>The image is scaled down multiple times using the GstFaceDetect::scale-factor
until the size is &lt;= GstFaceDetect::min-size-width or
GstFaceDetect::min-size-height.</p>
<div class="refsect2">
<a name="id-1.2.83.7.4"></a><h3>Example launch line</h3>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1</pre></td>
        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> autovideosrc <span class="gtkdoc opt">!</span> decodebin <span class="gtkdoc opt">!</span> colorspace <span class="gtkdoc opt">!</span> facedetect <span class="gtkdoc opt">!</span> videoconvert <span class="gtkdoc opt">!</span> xvimagesink</pre></td>
      </tr>
    </tbody>
  </table>
</div>
 Detect and show faces
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1</pre></td>
        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> autovideosrc <span class="gtkdoc opt">!</span> video<span class="gtkdoc opt">/</span>x<span class="gtkdoc opt">-</span>raw<span class="gtkdoc opt">,</span>width<span class="gtkdoc opt">=</span><span class="number">320</span><span class="gtkdoc opt">,</span>height<span class="gtkdoc opt">=</span><span class="number">240</span> <span class="gtkdoc opt">!</span> videoconvert <span class="gtkdoc opt">!</span> facedetect min<span class="gtkdoc opt">-</span>size<span class="gtkdoc opt">-</span>width<span class="gtkdoc opt">=</span><span class="number">60</span> min<span class="gtkdoc opt">-</span>size<span class="gtkdoc opt">-</span>height<span class="gtkdoc opt">=</span><span class="number">60</span> <span class="gtkdoc opt">!</span> colorspace <span class="gtkdoc opt">!</span> xvimagesink</pre></td>
      </tr>
    </tbody>
  </table>
</div>
 Detect large faces on a smaller image

</div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<div class="refsect2">
<a name="id-1.2.83.7.5.1"></a><h3>Element Information</h3>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">plugin</span></p></td>
<td>
            <a class="link" href="gst-plugins-bad-plugins-plugin-opencv.html#plugin-opencv">opencv</a>
          </td>
</tr>
<tr>
<td><p><span class="term">author</span></p></td>
<td>Michael Sheldon &lt;mike@mikeasoft.com&gt;</td>
</tr>
<tr>
<td><p><span class="term">class</span></p></td>
<td>Filter/Effect/Video</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="id-1.2.83.7.5.2"></a><h3>Element Pads</h3>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">name</span></p></td>
<td>sink</td>
</tr>
<tr>
<td><p><span class="term">direction</span></p></td>
<td>sink</td>
</tr>
<tr>
<td><p><span class="term">presence</span></p></td>
<td>always</td>
</tr>
<tr>
<td><p><span class="term">details</span></p></td>
<td>video/x-raw, format=(string)RGB, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td>
</tr>
</tbody>
</table></div>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">name</span></p></td>
<td>src</td>
</tr>
<tr>
<td><p><span class="term">direction</span></p></td>
<td>source</td>
</tr>
<tr>
<td><p><span class="term">presence</span></p></td>
<td>always</td>
</tr>
<tr>
<td><p><span class="term">details</span></p></td>
<td>video/x-raw, format=(string)RGB, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="refsect1">
<a name="gst-plugins-bad-plugins-facedetect.functions_details"></a><h2>Functions</h2>
<p></p>
</div>
<div class="refsect1">
<a name="gst-plugins-bad-plugins-facedetect.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GstFaceDetect-struct"></a><h3>struct GstFaceDetect</h3>
<pre class="programlisting">struct GstFaceDetect;</pre>
</div>
<hr>
<div class="refsect2">
<a name="GstFaceDetectUpdates"></a><h3>enum GstFaceDetectUpdates</h3>
<p>Bus messages update scheme</p>
<div class="refsect3">
<a name="GstFaceDetectUpdates.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="GST-FACEDETECT-UPDATES-EVERY-FRAME:CAPS"></a>GST_FACEDETECT_UPDATES_EVERY_FRAME</p></td>
<td class="enum_member_description">
<p>Send bus update messages for every frame</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-FACEDETECT-UPDATES-ON-CHANGE:CAPS"></a>GST_FACEDETECT_UPDATES_ON_CHANGE</p></td>
<td class="enum_member_description">
<p>Send bus update messages on change (face detected/not detected)</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-FACEDETECT-UPDATES-ON-FACE:CAPS"></a>GST_FACEDETECT_UPDATES_ON_FACE</p></td>
<td class="enum_member_description">
<p>Send bus update messages when a face is detected</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-FACEDETECT-UPDATES-NONE:CAPS"></a>GST_FACEDETECT_UPDATES_NONE</p></td>
<td class="enum_member_description">
<p>No bus update messages</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="refsect1">
<a name="gst-plugins-bad-plugins-facedetect.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GstFaceDetect--display"></a><h3>The <code class="literal">“display”</code> property</h3>
<pre class="programlisting">  “display”                  <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
<p>Sets whether the detected faces should be highlighted in the output.</p>
<p>Flags: Read / Write</p>
<p>Default value: TRUE</p>
</div>
<hr>
<div class="refsect2">
<a name="GstFaceDetect--eyes-profile"></a><h3>The <code class="literal">“eyes-profile”</code> property</h3>
<pre class="programlisting">  “eyes-profile”             <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre>
<p>Location of Haar cascade file to use for eye-pair detection.</p>
<p>Flags: Read / Write</p>
<p>Default value: "/usr/share/opencv/haarcascades/haarcascade_mcs_eyepair_small.xml"</p>
</div>
<hr>
<div class="refsect2">
<a name="GstFaceDetect--flags"></a><h3>The <code class="literal">“flags”</code> property</h3>
<pre class="programlisting">  “flags”                    <span class="type">GstOpencvFaceDetectFlags</span></pre>
<p>Flags to cvHaarDetectObjects.</p>
<p>Flags: Read / Write</p>
<p>Default value: Do Canny edge detection to discard some regions</p>
</div>
<hr>
<div class="refsect2">
<a name="GstFaceDetect--min-neighbors"></a><h3>The <code class="literal">“min-neighbors”</code> property</h3>
<pre class="programlisting">  “min-neighbors”            <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
<p>Minimum number (minus 1) of neighbor rectangles that makes up an object.</p>
<p>Flags: Read / Write</p>
<p>Allowed values: &gt;= 0</p>
<p>Default value: 3</p>
</div>
<hr>
<div class="refsect2">
<a name="GstFaceDetect--min-size-height"></a><h3>The <code class="literal">“min-size-height”</code> property</h3>
<pre class="programlisting">  “min-size-height”          <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
<p>Minimum area height to be recognized as a face.</p>
<p>Flags: Read / Write</p>
<p>Allowed values: &gt;= 0</p>
<p>Default value: 30</p>
</div>
<hr>
<div class="refsect2">
<a name="GstFaceDetect--min-size-width"></a><h3>The <code class="literal">“min-size-width”</code> property</h3>
<pre class="programlisting">  “min-size-width”           <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
<p>Minimum area width to be recognized as a face.</p>
<p>Flags: Read / Write</p>
<p>Allowed values: &gt;= 0</p>
<p>Default value: 30</p>
</div>
<hr>
<div class="refsect2">
<a name="GstFaceDetect--mouth-profile"></a><h3>The <code class="literal">“mouth-profile”</code> property</h3>
<pre class="programlisting">  “mouth-profile”            <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre>
<p>Location of Haar cascade file to use for mouth detection.</p>
<p>Flags: Read / Write</p>
<p>Default value: "/usr/share/opencv/haarcascades/haarcascade_mcs_mouth.xml"</p>
</div>
<hr>
<div class="refsect2">
<a name="GstFaceDetect--nose-profile"></a><h3>The <code class="literal">“nose-profile”</code> property</h3>
<pre class="programlisting">  “nose-profile”             <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre>
<p>Location of Haar cascade file to use for nose detection.</p>
<p>Flags: Read / Write</p>
<p>Default value: "/usr/share/opencv/haarcascades/haarcascade_mcs_nose.xml"</p>
</div>
<hr>
<div class="refsect2">
<a name="GstFaceDetect--profile"></a><h3>The <code class="literal">“profile”</code> property</h3>
<pre class="programlisting">  “profile”                  <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre>
<p>Location of Haar cascade file to use for face detection.</p>
<p>Flags: Read / Write</p>
<p>Default value: "/usr/share/opencv/haarcascades/haarcascade_frontalface_default.xml"</p>
</div>
<hr>
<div class="refsect2">
<a name="GstFaceDetect--scale-factor"></a><h3>The <code class="literal">“scale-factor”</code> property</h3>
<pre class="programlisting">  “scale-factor”             <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a></pre>
<p>Factor by which the frame is scaled after each object scan.</p>
<p>Flags: Read / Write</p>
<p>Allowed values: [1.1,10]</p>
<p>Default value: 1.25</p>
</div>
<hr>
<div class="refsect2">
<a name="GstFaceDetect--updates"></a><h3>The <code class="literal">“updates”</code> property</h3>
<pre class="programlisting">  “updates”                  <a class="link" href="gst-plugins-bad-plugins-facedetect.html#GstFaceDetectUpdates" title="enum GstFaceDetectUpdates"><span class="type">GstFaceDetectUpdates</span></a></pre>
<p>When send update bus messages, if at all.</p>
<p>Flags: Read / Write</p>
<p>Default value: Send update messages on every frame</p>
</div>
<hr>
<div class="refsect2">
<a name="GstFaceDetect--min-stddev"></a><h3>The <code class="literal">“min-stddev”</code> property</h3>
<pre class="programlisting">  “min-stddev”               <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
<p>Minimum image average standard deviation: on images with standard deviation lesser than this value facedetection will not be performed. Setting this property help to save cpu and reduce false positives not performing face detection on images with little changes.</p>
<p>Flags: Read / Write</p>
<p>Allowed values: [0,255]</p>
<p>Default value: 0</p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.28</div>
</body>
</html>